<script setup lang="ts">
import {ref} from 'vue'
import useAddToDo from '@/hooks/useAddToDo'

const {addToDo} = useAddToDo()
let title = ref<string>('')
let content = ref<string>('')
</script>

<template>
  <el-input type="text" v-model="title" placeholder="标题"/>
  <el-input
      v-model="content"
      :rows="2"
      input-style="height: 300px; margin-top: 30px;"
      type="textarea"
      placeholder="文章内容"
  />
  <el-button type="primary" @click="addToDo(title,content)">发布</el-button>
</template>

<style scoped>
</style>